package com.kylin.dal.entity.order;

import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 主订单数据项
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月01日 15:46
 */
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_order_master", catalog = "db_kylin_artwork")
public final class OrderMainEntry extends BaseEntry implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long orderId;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "order_no", length = 30)
    private String orderNo;

    @Column(name = "total_fee")
    private Long totalFee;

    @Column(name = "product_fee")
    private Long productFee;

    @Column private Long freight;

    @Column(name = "pay_mode", columnDefinition = "SMALLINT")
    private Integer payMode;

    @Column(name = "paid_fee")
    private Long paidFee;

    @Column(name = "discount_fee")
    private Long discountFee;

    @Column(name = "coupon_fee")
    private Long couponFee;

    @Column(name = "pay_deadline")
    private Long payDeadline;

    @Column private Integer state;
    @Column private String message;

    @Column(name = "express_company")
    private String expressCompany;

    @Column(name = "express_no")
    private String expressNo;

    @Column(name = "created_at", updatable = false, nullable = false)
    private Long createdAt;

    @Column(name = "created_by", updatable = false, nullable = false)
    private Long createdBy;

    @Column(name = "updated_at")
    private Long updatedAt;

    @Column(name = "updated_by")
    private Long updatedBy;

}
